<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui">

<ui:composition>
	<p:dataTable var="feedBack" value="#{feedBackModel.list}" filteredValue="#{feedBackModel.filteredList}" filterEvent="enter"
		rowKey="#{feedBack.id}" selection="#{feedBackModel.current}"
		selectionMode="single" paginator="true"   rows="10" rowsPerPageTemplate="5,7,10,15,20,30,40,50"
		paginatorTemplate="{CurrentPageReport}  {FirstPageLink} {PreviousPageLink} {PageLinks} {NextPageLink} {LastPageLink} {RowsPerPageDropdown}">
		<p:ajax event="rowSelect" update=":detailForm,:headerForm"
			listener="#{feedBackController.onRowSelect}"></p:ajax>
		<p:column headerText="id">
			<h:outputText value="#{feedBack.id}" />
		</p:column>
		<p:column headerText="Read" sortBy="#{feedBack.isRead}">
			<h:outputText value="#{feedBack.isRead}" />
		</p:column>
		<p:column headerText="Type" sortBy="#{feedBack.type.label}"
			filterBy="#{feedBack.type.label}" filterMatchMode="contains">
			<h:outputText value="#{feedBack.type.label}" />
		</p:column>
		<p:column headerText="Date" sortBy="#{feedBack.feedBackedDate}"
			filterBy="#{feedBack.feedBackedDate}" filterMatchMode="contains">
			<h:outputText value="#{feedBack.feedBackedDate}" />
		</p:column>
		<p:column headerText="Email" sortBy="#{feedBack.email}"
			filterBy="#{feedBack.email}" filterMatchMode="contains">
			<h:outputText value="#{feedBack.email}" />
		</p:column>
		<p:column headerText="Telephone" sortBy="#{feedBack.telephone}"
			filterBy="#{feedBack.telephone}" filterMatchMode="contains">
			<h:outputText value="#{feedBack.telephone}" />
		</p:column>
	</p:dataTable>
</ui:composition>
</html>